<?php
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
get_header();
?>
<?php

// ukaz informacie o jednotlivom uzivatelovi
$usr = get_userdata(intval($author));
if ($usr->wp_user_level >= 7) {
    echo '<h2>';
    echo (isset($usr->name)?$usr->name:$usr->degree.' '.$usr->first_name.' '.$usr->last_name);
    echo '</h2>';
    echo '<hr class="h2hr" /><div class="clearer"></div>';
    echo '<table id="userTable">';
    echo '<tr>';
    echo '<td class="photo">';
    $vtpEmployees->getPhoto($usr->ID, false);
    echo '</td>';
    echo '<td class="info">';
    echo '<h4>Osobné informácie</h4>';
    echo '<table class="infoTable">';
    echo '<tr>';
    echo '<td class="infoKey">Email:</td>';
    echo '<td class="infoValue">';
    echo '<a href="mailto:'.$usr->user_email.'">';
    echo $usr->user_email;
    echo '</a>';
    echo '</td>';
    echo '</tr>';
    if (!empty($usr->user_url)) {
        echo '<tr>';
        echo '<td>Web:</td>';
        echo '<td class="infoValue">';
        echo '<a href="'.$usr->user_url.'" target="_blank">';
        echo $usr->user_url;
        echo '</a>';
        echo '</td>';
        echo '</tr>';
    }
    if (!empty($usr->icq)) {
    echo '<tr>';
    echo '<td>ICQ:</td>';
    echo '<td class="infoValue">';
    echo $usr->icq;
    echo '</td>';
    echo '</tr>';
    }
    if (!empty($usr->skype)) {
    echo '<tr>';
    echo '<td>Skype:</td>';
    echo '<td class="infoValue">';
    echo $usr->skype;
    echo '</td>';
    echo '</tr>';
    }
    if (!empty($usr->jabber)) {
    echo '<tr>';
    echo '<td>Google Talk:</td>';
    echo '<td class="infoValue">';
    echo $usr->jabber;
    echo '</td>';
    echo '</tr>';
    }
    if (!empty($usr->phone1)) {
    echo '<tr>';
    echo '<td>Telefón:</td>';
    echo '<td class="infoValue">';
    echo $usr->phone1;
    echo '</td>';
    echo '</tr>';
    }
    if (!empty($usr->phone2)) {
    echo '<tr>';
    echo '<td>Telefón:</td>';
    echo '<td class="infoValue">';
    echo $usr->phone2;
    echo '</td>';
    echo '</tr>';
    }
    if (!empty($usr->phone3)) {
    echo '<tr>';
    echo '<td>Telefón:</td>';
    echo '<td class="infoValue">';
    echo $usr->phone3;
    echo '</td>';
    echo '</tr>';
    }
    if (!empty($usr->link1)) {
    echo '<tr>';
    echo '<td>Link:</td>';
    echo '<td class="infoValue">';
    echo '<a href="'.$usr->link1.'" target="_blank">';
    echo $usr->link1;
    echo '</a>';
    echo '</td>';
    echo '</tr>';
    }
    if (!empty($usr->link2)) {
    echo '<tr>';
    echo '<td>Link:</td>';
    echo '<td class="infoValue">';
    echo '<a href="'.$usr->link2.'" target="_blank">';
    echo $usr->link2;
    echo '</a>';
    echo '</td>';
    echo '</tr>';
    }
    if (!empty($usr->link3)) {
    echo '<tr>';
    echo '<td>Link:</td>';
    echo '<td class="infoValue">';
    echo '<a href="'.$usr->link3.'" target="_blank">';
    echo $usr->link3;
    echo '</a>';
    echo '</td>';
    echo '</tr>';
    }
    echo '</table>';
    echo '</td>';
    echo '</tr>';
    echo '</table>';
    echo '<h3>Niečo o zamestnancovi:</h3>';
    echo '<hr class="h3hr" /><div class="clearer"></div>';
    echo '<p>';
    echo nl2br($usr->description);
    echo '</p>';
}
elseif ($usr->wp_user_level == 2) {
    echo '<h2>';
    echo $usr->name;
    echo '</h2>';
    echo '<hr class="h2hr" /><div class="clearer"></div>';
    echo '<table id="userTable">';
    echo '<tr>';
    echo '<td class="photo">';
    $vtpClients->getPhoto($usr->ID, false);
    echo '</td>';
    echo '<td class="info">';
    echo '<table class="infoTable">';
    echo '<tr>';
    echo '<td class="infoKey">&nbsp;</td>';
    echo '<td class="infoValue">';
    $x = $vtpClients->types;
    echo $x[$usr->where];
    echo '</td>';
    echo '</tr>';
    echo '<tr>';
    echo '<td class="infoKey">Email:</td>';
    echo '<td class="infoValue">';
    echo '<a href="mailto:'.$usr->user_email.'">';
    echo $usr->user_email;
    echo '</a>';
    echo '</td>';
    echo '</tr>';
    if (!empty($usr->user_url)) {
    echo '<tr>';
    echo '<td>Web:</td>';
    echo '<td class="infoValue">';
    echo '<a href="'.$usr->user_url.'" target="_blank">';
    echo $usr->user_url;
    echo '</a>';
    echo '</td>';
    echo '</tr>';
    }
    if (!empty($usr->icq)) {
    echo '<tr>';
    echo '<td>ICQ:</td>';
    echo '<td class="infoValue">';
    echo $usr->icq;
    echo '</td>';
    echo '</tr>';
    }
    if (!empty($usr->skype)) {
    echo '<tr>';
    echo '<td>Skype:</td>';
    echo '<td class="infoValue">';
    echo $usr->skype;
    echo '</td>';
    echo '</tr>';
    }
    if (!empty($usr->jabber)) {
    echo '<tr>';
    echo '<td>Google Talk:</td>';
    echo '<td class="infoValue">';
    echo $usr->jabber;
    echo '</td>';
    echo '</tr>';
    }
    if (!empty($usr->phone1)) {
    echo '<tr>';
    echo '<td>Telefón:</td>';
    echo '<td class="infoValue">';
    echo $usr->phone1;
    echo '</td>';
    echo '</tr>';
    }
    if (!empty($usr->phone2)) {
    echo '<tr>';
    echo '<td>Telefón:</td>';
    echo '<td class="infoValue">';
    echo $usr->phone2;
    echo '</td>';
    echo '</tr>';
    }
    if (!empty($usr->phone3)) {
    echo '<tr>';
    echo '<td>Telefón:</td>';
    echo '<td class="infoValue">';
    echo $usr->phone3;
    echo '</td>';
    echo '</tr>';
    }
    if (!empty($usr->fax)) {
    echo '<tr>';
    echo '<td>Fax:</td>';
    echo '<td class="infoValue">';
    echo $usr->fax;
    echo '</td>';
    echo '</tr>';
    }
    echo '</table>';
    echo '</td>';
    echo '</tr>';
    echo '</table>';
    echo '<h3>Aktivity:</h3>';
    echo '<hr class="h3hr" /><div class="clearer"></div>';
    echo '<p>';
    echo nl2br($usr->activity);
    echo '</p>';
}

?>
<?php
get_footer();
?>